﻿@using FL.SiteEntity;
@using FL.Common;
@using FL.Bussiness.Site;

@{
    Layout = "~/Views/Shared/_ArcticleViewLayout.cshtml";
    //ViewBag.Title = "Home Page";
    t_site_article article = ViewBag.article;
    IList<t_site_article> list = ViewBag.union_articles as IList<t_site_article>;
    BArticle bArticle = BArticle.CreateInstance();
    bool isLogin = Session["user"] != null;
}
<div class="container DivHeight">
    <div class="row" style="margin-top:10px;">
        <div class="col-md-12" ><a href="/">首页</a>@Html.Raw( bArticle.GetNavString(article.id))>>正文</div>
        <div class="col-md-12" style="text-align:center;border-bottom:1px solid #ccc;margin-bottom:20px"><h2><b>@article.title</b></h2>
            <p class="contenticon">
                <span><img src="/images/img/calendar.png" alt=""></span><span>@article.add_time.ToShortDateString()&nbsp;&nbsp;&nbsp;&nbsp;</span>
                <span><img src="/images/img/Click.png" alt=""></span><span>@article.read_count&nbsp;&nbsp;&nbsp;&nbsp;</span>
            </p>
        </div>
        
        <div class="col-md-8" style="background-color:#fff;padding-top:15px;padding-bottom:15px;">

            @Html.Raw(article.content)

            <div style="margin-top:35px;">
                @if (list != null)
                {
                    <h4><b>相关资讯</b></h4>
                    foreach (t_site_article _article in list)
                    {
                        <div class="row NewsRow">
                            <div class="col-md-2 NewsDiv">
                                <p class="NewsYear">@_article.add_time.Year</p>
                                <p>@_article.add_time.Month-@_article.add_time.Day</p>
                                <p class="clickRate">阅读:<span>@_article.read_count</span></p>
                            </div>
                            <div class="col-md-10">
                                <p class="NewsList"><a href="/Article/ArticleView?id=@_article.id">@_article.title</a></p>
                                <p class="NewsCont"><a href="/Article/ArticleView?id=@_article.id">@_article.zhaiyao</a></p>
                            </div>
                        </div>
                    }
                }
            </div>
        </div>
        <div class="col-md-4">
            <div class="row">
                @Html.Partial("articlePlusView")
            </div>
        </div>
        <div class="col-md-8">
            @if (isLogin)
            {
                <textarea id="replay_count" style="width:100%"></textarea>
            }
            else
            {
                <span>您需要<a href="/home/reg?returnUrl=">登录</a>以后才能平论，未注册用户请先<a href="/home/reg">注册</a>。</span>
            }
        </div>

    </div>
</div>